<? if ($c = stack('name')) {
	
	if (is_array($r = $_SESSION['reg_sent'])) {
		
		$s = component_settings($c);
		
		$tpl_tags = array(
			'email' => $r['email'],
			'expires' => $r['expires'],
		);
		
		$_SESSION['reg_sent'] = false;
	
		$se = array(); $re = array();	foreach($tpl_tags as $k => $v) { $se[] = '{'.$k.'}'; $re[] = $v; }

		$DATA['components'][$c]['data'] = array('text' => str_replace($se, $re, $s['mail_sent']));

	} else {
		header("Location: "._transformURL($CURRENT->url, array('remove_param' => 'reg')));
		exit;	
	}
unstack();
}